<?php
/*
	Automatic link aggregating
	Yahoo
	Delicious
	Google

*/
class Link_AutoController extends Veneer_Controller_Auto
{
    protected $_dbArray =array('Link');
    protected $_moduleName = 'link';
    protected $_config_module = array();

    function indexAction()
    {
    }

    function yahooAction()
    {
		// p1 = term
		// p1 = phrase Y/N
		// p = status
		// p = max #
		// p
		static  $formArray = array();
		$appId = "0Brer8jIkY09EXDYDtWug6zuAxxV1RL1OOo-";

        $yahoo = new Zend_Service_Yahoo($appId);
		$results = $yahoo->webSearch('Dragon Boat', array("results"=>100, "type"=>"phrase"));
		print $results->totalResultsAvailable . "=results Avail<br />";
		print $results->totalResultsReturned . "=results returned<br />";
		print $results->firstResultPosition . "=1st result pos<br /><br /><br />";
		foreach ($results as $result) {
		    echo "<a href=$result->Url>$result->Title</a> - " . date("Y-m-d H:m:s", $result->ModificationDate) . "<br />$result->Summary<br /><br />";
		}
    }

}